package com.etc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.etc.dao.ComResumeMapper;
import com.etc.entity.ComResume;
import com.etc.entity.LayUiData;
import com.etc.service.ComResumeService;

@Service
public class ComResumeServiceImpl implements ComResumeService {

	@Autowired
	private ComResumeMapper crs;

	@Override
	public LayUiData<ComResume> queryIscomName(int page, int limit, String strLike) {
		// TODO Auto-generated method stub
		int start = (page - 1) * limit;
		LayUiData<ComResume> laydata = new LayUiData<ComResume>();
		laydata.setCode(0);
		laydata.setMsg("");
		List<ComResume> list = crs.queryIscomName(page, limit, strLike);
		laydata.setCount(crs.getResumeCount());//后续替换成实际的记录数
		laydata.setData(list);
		return laydata;
	}

	@Override
	public int getCount(String comName) {
		// TODO Auto-generated method stub
		return crs.getCount(comName);
	}

	@Override
	public boolean addComResume(ComResume comResume) {
		// TODO Auto-generated method stub
		return crs.addComResume(comResume)>0;
	}

	@Override
	public boolean deleteComResume(int resumeId) {
		// TODO Auto-generated method stub
		return crs.deleteComResume(resumeId)>0;
	}

	@Override
	public boolean updateComResume(ComResume comResume) {
		// TODO Auto-generated method stub
		return crs.updateComResume(comResume)>0;
	}
	
	

}
